3.104 \(\int \frac{d+e x+f x^2}{\sqrt{a+c x^2}} \, dx\)

Optimal. Leaf size=74 \[ \frac{(2 c d-a f) \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{2 c^{3/2}}+\frac{e \sqrt{a+c x^2}}{c}+\frac{f x \sqrt{a+c x^2}}{2 c} \]

[Out]

(e*Sqrt[a + c*x^2])/c + (f*x*Sqrt[a + c*x^2])/(2*c) + ((2*c*d - a*f)*ArcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])/(2*
c^(3/2))

________________________________________________________________________________________

Rubi [A]  time = 0.0483364, antiderivative size = 74, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182, Rules used = {1815, 641, 217, 206} \[ \frac{(2 c d-a f) \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{2 c^{3/2}}+\frac{e \sqrt{a+c x^2}}{c}+\frac{f x \sqrt{a+c x^2}}{2 c} \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x + f*x^2)/Sqrt[a + c*x^2],x]

[Out]

(e*Sqrt[a + c*x^2])/c + (f*x*Sqrt[a + c*x^2])/(2*c) + ((2*c*d - a*f)*ArcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])/(2*
c^(3/2))

Rule 1815

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Expon[Pq, x], e = Coeff[Pq, x, Expon[Pq, x]]}, Si
mp[(e*x^(q - 1)*(a + b*x^2)^(p + 1))/(b*(q + 2*p + 1)), x] + Dist[1/(b*(q + 2*p + 1)), Int[(a + b*x^2)^p*Expan
dToSum[b*(q + 2*p + 1)*Pq - a*e*(q - 1)*x^(q - 2) - b*e*(q + 2*p + 1)*x^q, x], x], x]] /; FreeQ[{a, b, p}, x]
&& PolyQ[Pq, x] &&  !LeQ[p, -1]

Rule 641

Int[((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(e*(a + c*x^2)^(p + 1))/(2*c*(p + 1)),
x] + Dist[d, Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, p}, x] && NeQ[p, -1]

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{d+e x+f x^2}{\sqrt{a+c x^2}} \, dx &=\frac{f x \sqrt{a+c x^2}}{2 c}+\frac{\int \frac{2 c d-a f+2 c e x}{\sqrt{a+c x^2}} \, dx}{2 c}\\ &=\frac{e \sqrt{a+c x^2}}{c}+\frac{f x \sqrt{a+c x^2}}{2 c}+\frac{(2 c d-a f) \int \frac{1}{\sqrt{a+c x^2}} \, dx}{2 c}\\ &=\frac{e \sqrt{a+c x^2}}{c}+\frac{f x \sqrt{a+c x^2}}{2 c}+\frac{(2 c d-a f) \operatorname{Subst}\left (\int \frac{1}{1-c x^2} \, dx,x,\frac{x}{\sqrt{a+c x^2}}\right )}{2 c}\\ &=\frac{e \sqrt{a+c x^2}}{c}+\frac{f x \sqrt{a+c x^2}}{2 c}+\frac{(2 c d-a f) \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{2 c^{3/2}}\\ \end{align*}

Mathematica [A]  time = 0.0406388, size = 63, normalized size = 0.85 \[ \frac{(2 c d-a f) \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )+\sqrt{c} \sqrt{a+c x^2} (2 e+f x)}{2 c^{3/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x + f*x^2)/Sqrt[a + c*x^2],x]

[Out]

(Sqrt[c]*(2*e + f*x)*Sqrt[a + c*x^2] + (2*c*d - a*f)*ArcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])/(2*c^(3/2))

________________________________________________________________________________________

Maple [A]  time = 0.052, size = 76, normalized size = 1. \begin{align*}{\frac{fx}{2\,c}\sqrt{c{x}^{2}+a}}-{\frac{af}{2}\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ){c}^{-{\frac{3}{2}}}}+{\frac{e}{c}\sqrt{c{x}^{2}+a}}+{d\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ){\frac{1}{\sqrt{c}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x^2+e*x+d)/(c*x^2+a)^(1/2),x)

[Out]

1/2*f*x*(c*x^2+a)^(1/2)/c-1/2*f*a/c^(3/2)*ln(x*c^(1/2)+(c*x^2+a)^(1/2))+e*(c*x^2+a)^(1/2)/c+d*ln(x*c^(1/2)+(c*
x^2+a)^(1/2))/c^(1/2)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^2+e*x+d)/(c*x^2+a)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.00256, size = 305, normalized size = 4.12 \begin{align*} \left [-\frac{{\left (2 \, c d - a f\right )} \sqrt{c} \log \left (-2 \, c x^{2} + 2 \, \sqrt{c x^{2} + a} \sqrt{c} x - a\right ) - 2 \,{\left (c f x + 2 \, c e\right )} \sqrt{c x^{2} + a}}{4 \, c^{2}}, -\frac{{\left (2 \, c d - a f\right )} \sqrt{-c} \arctan \left (\frac{\sqrt{-c} x}{\sqrt{c x^{2} + a}}\right ) -{\left (c f x + 2 \, c e\right )} \sqrt{c x^{2} + a}}{2 \, c^{2}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^2+e*x+d)/(c*x^2+a)^(1/2),x, algorithm="fricas")

[Out]

[-1/4*((2*c*d - a*f)*sqrt(c)*log(-2*c*x^2 + 2*sqrt(c*x^2 + a)*sqrt(c)*x - a) - 2*(c*f*x + 2*c*e)*sqrt(c*x^2 +
a))/c^2, -1/2*((2*c*d - a*f)*sqrt(-c)*arctan(sqrt(-c)*x/sqrt(c*x^2 + a)) - (c*f*x + 2*c*e)*sqrt(c*x^2 + a))/c^
2]

________________________________________________________________________________________

Sympy [A]  time = 3.07121, size = 150, normalized size = 2.03 \begin{align*} \frac{\sqrt{a} f x \sqrt{1 + \frac{c x^{2}}{a}}}{2 c} - \frac{a f \operatorname{asinh}{\left (\frac{\sqrt{c} x}{\sqrt{a}} \right )}}{2 c^{\frac{3}{2}}} + d \left (\begin{cases} \frac{\sqrt{- \frac{a}{c}} \operatorname{asin}{\left (x \sqrt{- \frac{c}{a}} \right )}}{\sqrt{a}} & \text{for}\: a > 0 \wedge c < 0 \\\frac{\sqrt{\frac{a}{c}} \operatorname{asinh}{\left (x \sqrt{\frac{c}{a}} \right )}}{\sqrt{a}} & \text{for}\: a > 0 \wedge c > 0 \\\frac{\sqrt{- \frac{a}{c}} \operatorname{acosh}{\left (x \sqrt{- \frac{c}{a}} \right )}}{\sqrt{- a}} & \text{for}\: c > 0 \wedge a < 0 \end{cases}\right ) + e \left (\begin{cases} \frac{x^{2}}{2 \sqrt{a}} & \text{for}\: c = 0 \\\frac{\sqrt{a + c x^{2}}}{c} & \text{otherwise} \end{cases}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x**2+e*x+d)/(c*x**2+a)**(1/2),x)

[Out]

sqrt(a)*f*x*sqrt(1 + c*x**2/a)/(2*c) - a*f*asinh(sqrt(c)*x/sqrt(a))/(2*c**(3/2)) + d*Piecewise((sqrt(-a/c)*asi
n(x*sqrt(-c/a))/sqrt(a), (a > 0) & (c < 0)), (sqrt(a/c)*asinh(x*sqrt(c/a))/sqrt(a), (a > 0) & (c > 0)), (sqrt(
-a/c)*acosh(x*sqrt(-c/a))/sqrt(-a), (c > 0) & (a < 0))) + e*Piecewise((x**2/(2*sqrt(a)), Eq(c, 0)), (sqrt(a +
c*x**2)/c, True))

________________________________________________________________________________________

Giac [A]  time = 1.17328, size = 78, normalized size = 1.05 \begin{align*} \frac{1}{2} \, \sqrt{c x^{2} + a}{\left (\frac{f x}{c} + \frac{2 \, e}{c}\right )} - \frac{{\left (2 \, c d - a f\right )} \log \left ({\left | -\sqrt{c} x + \sqrt{c x^{2} + a} \right |}\right )}{2 \, c^{\frac{3}{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^2+e*x+d)/(c*x^2+a)^(1/2),x, algorithm="giac")

[Out]

1/2*sqrt(c*x^2 + a)*(f*x/c + 2*e/c) - 1/2*(2*c*d - a*f)*log(abs(-sqrt(c)*x + sqrt(c*x^2 + a)))/c^(3/2)